home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / VOXRAY.ZIP / BUFFNODE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-19  |  1.1 KB  |  48 lines

  1. #ifndef _BUFFER_NODE_
  2. #define _BUFFER_NODE_
  3. #include "osbuffer.h"
  4. #include "memutil.h"
  5. #include <stddef.h>
  6.  
  7. typedef struct BUFFER_NODE * pbuffer_node;
  8.  
  9. typedef struct BUFFER_NODE {
  10.    poff_screen_buff data;
  11.    pbuffer_node next;
  12. } buffer_node;
  13.  
  14. inline BOOL BN_Empty_Node(pbuffer_node the_node) {
  15.    return (the_node==NULL ? TRUE : FALSE);
  16. }
  17.  
  18. inline pbuffer_node BN_Get_Next_Node(pbuffer_node the_node) {
  19.    return the_node->next;
  20. }
  21.  
  22. inline void BN_Set_Next_Node(pbuffer_node the_node, pbuffer_node next_node) {
  23. the_node->next=next_node;
  24. }
  25.                                      
  26. inline poff_screen_buff BN_Get_Data(pbuffer_node the_node) {
  27.    return the_node->data;
  28. }
  29.  
  30. inline void BN_Set_Data(pbuffer_node the_node, poff_screen_buff the_data) {
  31.    the_node->data=the_data;
  32. }
  33.  
  34. inline pbuffer_node BN_Create_Node() {
  35.    pbuffer_node new_buff_node=(pbuffer_node)NewPtr(sizeof(buffer_node));
  36.    return new_buff_node;
  37. }
  38.  
  39. inline void BN_Delete_Node(pbuffer_node del_node) {
  40.   DelPtr(del_node);
  41. }
  42.  
  43. inline void BN_Set_Node(pbuffer_node & base, pbuffer_node new_bn) {
  44.    base=new_bn;
  45. }
  46.  
  47. #endif
  48.